﻿Namespace Controllers


    Public Class HomeController
        Inherits BaseController

        '
        ' GET: /Home
        <Authorize()> _
        Function Index() As ActionResult
            Dim strRol As String = Roles.GetRolesForUser().SingleOrDefault
            Select Case strRol
                Case "ALU"
                    Return RedirectToAction("index", "Alumnos")
                Case "PRF"
                    Return RedirectToAction("index", "Profesores")
                Case "ERA"
                    Return RedirectToAction("index", "RegAcad")
            End Select
        End Function

        <Authorize()> _
        Function SignOut() As ActionResult
            FormsAuthentication.SignOut()
            Return RedirectToAction("LogOn", "Accounts")
        End Function

    End Class
End Namespace
